<p> <a href="<?php echo $this->url(array('controller' => 'visiteur', 'action' => 'ajouter')); ?>"Ajouter un visiteur </a></p> <p> <a href="<?php echo $this->url(array('controller' => 'authentication', 'action' => 'logout')); ?>">D&eacuteconnection</a></p>
<div class="col-md-10 text-center">
    <table class="table table-striped">
        <th class="text-center">ID</th>
        <th class="text-center">Nom</th>
        <th class="text-center">Prenom</th>
        <th class="text-center">Date Embauche</th>
        <th class="text-center">Action</th>
        <?php foreach ($this->paginator as $unVisiteur): //tableau d'objets ?> 
            <tr> 
                <td><?php echo $this->escape($unVisiteur['id']); ?></td> 
                <td><?php echo $this->escape($unVisiteur['nom']); ?></td> 
                <td><?php echo $this->escape($unVisiteur['prenom']); ?></td> 
                <td><?php echo $this->escape($unVisiteur['dateEmbauche']); ?></td> 
                <td><a class="btn btn-primary" href="<?php echo $this->url(array('controller' => 'visiteur', 'action' => 'modifier', 'id' => $unVisiteur['id'])); ?>">
                        Modifier</a>
                    <a class="btn btn-danger" href="<?php echo $this->url(array('controller' => 'visiteur', 'action' => 'supprimer', 'id' => $unVisiteur['id'])); ?>">
                        Supprimer</a>
                </td>
            </tr>
        <?php endforeach; ?>
    </table>
    <ul class="pagination">
        <?php
        $pages = $this->paginator->getPages();
        if ($pages->current != $pages->first) {

            echo "<li><a href=?page=$pages->first>Début</a></li> ";
        }
        if (isset($pages->previous)) {

            echo "<li><a href=?page=$pages->previous>Précédent</a></li> ";
        }
        foreach ($pages->pagesInRange as $page) {

            echo "<li><a href=?page=$page>$page</a></li>";
        }
        if (isset($pages->next)) {

            echo "<li><a href=?page=$pages->next>Suivant</a></li>";
        }
        if ($pages->current != $pages->last) {

            echo "<li><a href=?page=$pages->last>Fin</a></li> ";
        }
        ?>
    </ul>
</div>
</div>